﻿using MyRoguelike.Game.Objects;

//Todo: description for each item
namespace MyRoguelike.Game.Items
{
    class GameItem
    {
        public GameObject GameObj { get; set; }

        // Item is equip>
        public bool IsEquip { get; set; }

        // Is on?
        public bool IsOn { get; set; }

        // Item category
        public ECategory Category { get; set; }

        // Item name
        public string Name { get; set; }

        public GameItem()
        {
            IsEquip = false;
            Category = ECategory.None;
        }

        /// <summary>
        /// Enable item
        /// </summary>
        public virtual void On()
        {
            IsOn = true;
        }

        /// <summary>
        /// Use item
        /// </summary>
        /// <returns>If use is complete that returns 'true'</returns>
        public virtual bool Use()
        {
            return true;
        }

        /// <summary>
        /// Disable item
        /// </summary>
        public virtual void Off()
        {
            IsOn = false;
        }

        public enum ECategory
        {
            None,
            Potion,
            Weapon
        }
    }
}
